package com.example.demo.spring.ioc.case02.ca;

import com.example.demo.spring.ioc.case02.Autowire;
import com.example.demo.spring.ioc.case02.Component;

/**
 * d定义一个模拟的业务接口
 * @author: htc
 * @date: Created in 16:37 2019/1/10.
 */
@Component(id = "businessObject")
public class BusinessObject {
    @Autowire(id = "dataAccessInterface")
    private DataAccessInterface dat;

    public void print() {
        System.out.println(dat.queryFromTableA());
    }

    public void setDat(DataAccessInterface dat) {
        this.dat = dat;
    }
}